home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Developer Essentials / DTS Sample Code / DTS Japan-Sample Code / AppleEvent•MacApp2.0•QuickDraw / Draw.r < prev    next >
Encoding:
Text File  |  1992-02-05  |  5.8 KB  |  258 lines  |  [TEXT/MPS ]

  1. //---------------------------------------------------------------------
  2. //     Copyright © 1991 Apple Computer, Japan Inc. All rights reserved.
  3. //
  4. //        '91 Dec.11  Programed by Taro Tanaka
  5. //
  6. //        Developer Technical Supprt, Service and Support
  7. //        
  8. //---------------------------------------------------------------------
  9.  
  10. #ifndef __TYPES.R__
  11. #include "Types.r"
  12. #endif
  13.  
  14. #ifndef __MacAppTypes__
  15. #include "MacAppTypes.r"
  16. #endif
  17.  
  18. #ifndef __ViewTypes__
  19. #include "ViewTypes.r"
  20. #endif
  21.  
  22. #if qDebug
  23. include "Debug.rsrc";
  24. #endif
  25. include "MacApp.rsrc";
  26. include "Printing.rsrc";
  27.  
  28. include $$Shell("ObjApp")"Draw" 'CODE';
  29.  
  30. include $$Shell("SrcApp")"Icon.rsrc";        //   ICON 1000   
  31. include $$Shell("SrcApp")"Views.rsrc";        //   view 1000
  32.  
  33. include "Defaults.rsrc"    'ALRT' (phAboutApp);            // default about window
  34. include "Defaults.rsrc"    'DITL' (phAboutApp);            // default about contents
  35. include "Defaults.rsrc"    'STR#' (kDefaultCredits);    // default credits
  36. include "Defaults.rsrc" 'vers' (1);                        // Application or file specific
  37. include "Defaults.rsrc" 'vers' (2);                        // Overall package
  38. include "Defaults.rsrc"  'MApp' (0);
  39.  
  40. // =================================================================
  41. #define  cSketcher          1000
  42.  
  43. #define  cBlack                 2001
  44. #define  cRed                     2002
  45. #define  cGreen                 2003
  46. #define  cBlue                    2004
  47.  
  48. #define  cDeleteFirst        3001
  49. #define  cDeleteFirstMsg    3101
  50.  
  51. #define    cSetSelf                4001
  52. #define    cSetTargetAddress    4002
  53. #define    cLaunch                4003
  54.  
  55. #define    cSound                4501
  56.  
  57. #define    cAEOpen                5001
  58. #define    cAEPrint                5002
  59. #define    cAENew                5003
  60. #define    cAEClose                5004
  61. #define    cAEAboutApp            5005
  62.  
  63. // =================================================================
  64. resource 'seg!' (256,
  65. #if qNames
  66. "Draw",
  67. #endif
  68.     purgeable) {
  69.     {    "GPrint";
  70.         "GSelCommand";
  71.     }
  72. };
  73.  
  74. // =================================================================
  75. resource 'cmnu' (mApple,
  76. #if qNames
  77. "mApple",
  78. #endif
  79. nonpurgeable) {
  80.     mApple,
  81.     textMenuProc,
  82.     0x7FFFFFFD,
  83.     enabled,
  84.     apple,
  85.     {
  86.     "About…", noIcon, noKey, noMark, plain, cAEAboutApp;        // The ^0 will be dynamically replaced with CurApName
  87.                                                                                     // * AppleEvent
  88.     "-",         noIcon, noKey, noMark, plain, nocommand
  89.     }
  90. };
  91.  
  92. resource 'cmnu' (mFile,
  93. #if qNames
  94. "mFile",
  95. #endif
  96. nonpurgeable) {
  97.     mFile,
  98.     textMenuProc,
  99.     0x7FFFFFFD,
  100.     enabled,
  101.     "File",
  102.     {
  103.     "New",                    noIcon, "N",    noMark, plain, cAENew;        // * AppleEvent
  104.     "Open…",                    noIcon, "O",    noMark, plain, cAEOpen;        // * AppleEvent
  105.     "-",                        noIcon, noKey,    noMark, plain, nocommand;
  106.     "Close",                    noIcon, "W",    noMark, plain, cAEClose;    // * AppleEvent
  107.     "Save",                    noIcon, "S",    noMark, plain, cSave;
  108.     "Save As…",                noIcon, noKey,    noMark, plain, cSaveAs;
  109.     "Save a Copy In…",    noIcon, noKey,    noMark, plain, cSaveCopy;
  110.     "Revert",                noIcon, noKey,    noMark, plain, cRevert;
  111.     "-",                        noIcon, noKey,    noMark, plain, nocommand;
  112.     "Page Setup…",            noIcon, noKey,    noMark, plain, cPageSetup;
  113.     "Print One",            noIcon, noKey,    noMark, plain, cPrintOne;
  114.     "Print…",                noIcon, "P",    noMark, plain, cPrint;        // * AppleEvent
  115.     "-",                        noIcon, noKey,    noMark, plain, nocommand;
  116.     "Quit",                    noIcon, "Q",    noMark, plain, cQuit            // * AppleEvent
  117.     }
  118. };
  119.  
  120. include "Defaults.rsrc"    'cmnu' (mEdit);                // default Edit menu
  121.  
  122. resource 'cmnu' (4) {
  123.     4,
  124.     textMenuProc,
  125.     0x7FFFFFFF,
  126.     enabled,
  127.     "Color",
  128.      {
  129.         "Black", noIcon, "K", noMark, plain, cBlack;
  130.         "-", noIcon, noKey, noMark, plain, nocommand;
  131.         "Red", noIcon, "R", noMark, plain, cRed;
  132.         "Green", noIcon, "G", noMark, plain, cGreen;
  133.         "Blue", noIcon, "B", noMark, plain, cBlue;
  134.     }
  135. };
  136.  
  137. resource 'cmnu' (5) {
  138.     5,
  139.     textMenuProc,
  140.     0x7FFFFFFF,
  141.     enabled,
  142.     "Delete",
  143.      {
  144.         "First", noIcon, "F", noMark, plain, cDeleteFirst;
  145.     }
  146. };
  147.  
  148. resource 'cmnu' (6) {
  149.     6,
  150.     textMenuProc,
  151.     0x7FFFFFFF,
  152.     enabled,
  153.     "Target",
  154.      {
  155.         "Self", noIcon, noKey, noMark, plain, cSetSelf;
  156.         "other…", noIcon, noKey, noMark, plain, cSetTargetAddress;
  157.         "-", noIcon, noKey, noMark, plain, nocommand;
  158.         "Launch…", noIcon, noKey, noMark, plain, cLaunch;
  159.     }
  160. };
  161.  
  162. resource 'cmnu' (7) {
  163.     7,
  164.     textMenuProc,
  165.     0x7FFFFFFF,
  166.     enabled,
  167.     "Sound",
  168.      {
  169.         "Sound", noIcon, noKey, noMark, plain, cSound;
  170.     }
  171. };
  172.  
  173. resource 'cmnu' (128) {
  174.     128,
  175.     textMenuProc,
  176.     allEnabled,
  177.     enabled,
  178.     "Buzzwords",
  179.      {
  180.         "Page Setup Change", noIcon, noKey, noMark, plain, cChangePrinterStyle;
  181.         "Sketch", noIcon, noKey, noMark, plain, cSketcher;
  182.         "Delete First", noIcon, noKey, noMark, plain, cDeleteFirstMsg;
  183.     }
  184. };
  185.  
  186. resource 'MBAR' (kMBarDisplayed,
  187. #if qNames
  188. "Calc",
  189. #endif
  190.     purgeable) {
  191.     {mApple; mFile; mEdit; 4; 5; 6; 7; }
  192. };
  193.  
  194.  
  195. //  ------------------------------------------------------------------------------ 
  196. resource 'mctb' (4) {
  197.     {
  198.     //  Black 
  199.     4, 1,
  200.         {
  201.         0x0000, 0x0000, 0x0000;            //  Mark color 
  202.         0x0000, 0x0000, 0x0000;            //  Name color 
  203.         0x0000, 0x0000, 0x0000;            //  Command Key color 
  204.         0xFFFF, 0xFFFF, 0xFFFF            //  Background color 
  205.         };
  206.     //  Red 
  207.     4, 3,
  208.         {
  209.         0xDB00, 0x0000, 0x0000;            //  Mark color 
  210.         0xDB00, 0x0000, 0x0000;            //  Name color 
  211.         0xDB00, 0x0000, 0x0000;            //  Command Key color 
  212.         0xFFFF, 0xFFFF, 0xFFFF            //  Background color 
  213.         };
  214.     //  Green 
  215.     4, 4,
  216.         {
  217.         0x0000, 0xDB00, 0x0000;            //  Mark color 
  218.         0x0000, 0xDB00, 0x0000;            //  Name color 
  219.         0x0000, 0xDB00, 0x0000;            //  Command Key color 
  220.         0xFFFF, 0xFFFF, 0xFFFF            //  Background color 
  221.         };
  222.     //  Blue 
  223.     4, 5,
  224.         {
  225.         0x0000, 0x0000, 0xFFFF;            //  Mark color 
  226.         0x0000, 0x0000, 0xFFFF;            //  Name color 
  227.         0x0000, 0x0000, 0xFFFF;            //  Command Key color 
  228.         0xFFFF, 0xFFFF, 0xFFFF            //  Background color 
  229.         };
  230.     }
  231. };
  232.  
  233. resource 'SIZE' (-1) {
  234.     saveScreen,
  235.     acceptSuspendResumeEvents,
  236.     enableOptionSwitch,
  237.     canBackground,
  238.     MultiFinderAware,
  239.     backgroundAndForeground,
  240.     dontGetFrontClicks,
  241.     acceptChildDiedEvents,
  242.     is32BitCompatible,
  243.     isHighLevelEventAware,        // highlevel event aware
  244.     localAndRemoteHLEvents,        //    local and remote highlevel event aware
  245.     reserved,
  246.     reserved,
  247.     reserved,
  248.     reserved,
  249.     reserved,
  250. #if qdebug
  251.     450 * 1024,
  252.     368 * 1024
  253. #else
  254.     300 * 1024,
  255.     200 * 1024
  256. #endif
  257. };
  258.